package com.template.templateuser.common.exception.exceptions;

import lombok.Data;
import org.springframework.security.core.AuthenticationException;

@Data
public class UserRuntimeException extends RuntimeException {
    private static final long serialVersionUID = 1L;
    private Integer code;
    private String msg;
    public UserRuntimeException(String msg){
        super(msg);
        this.msg=msg;
    }
    public UserRuntimeException(Integer code,String msg){
        super(msg);
        this.msg=msg;
        this.code=code;
    }
    public UserRuntimeException(Integer errorCode, String errorMsg, Throwable cause) {
        //super(errorCode, cause);
        super(cause);
        this.code = errorCode;
        this.msg = errorMsg;
    }
}
